home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / nihcl-30.lha / nihcl-3.0 / ex / ex8-13.c < prev    next >
C/C++ Source or Header  |  1990-05-15  |  620b  |  26 lines

  1. // ex8-13.c -- Comparison of classes Set and IdentSet
  2.  
  3. // $Header: /afs/alw.nih.gov/unix/sun4_40c/usr/local/src/nihcl-3.0/share/ex/RCS/ex8-13.c,v 3.0 90/05/15 22:46:06 kgorlen Rel $
  4.  
  5. #include "Set.h"
  6. #include "IdentSet.h"
  7. #include "String.h"
  8. #include "SortedCltn.h"
  9.  
  10. main()
  11. {
  12.     String s1 = "A String";
  13.     String s2 = "A String";
  14.     String s3 = "Another String";
  15.  
  16.     Set s;
  17.     s.add(s1); s.add(s2); s.add(s3); s.add(s3);
  18.     cout << "Set:\n";
  19.     cout << s.asSortedCltn() << endl;
  20.  
  21.     IdentSet i;
  22.     i.add(s1); i.add(s2); i.add(s3); i.add(s3);
  23.     cout << "\nIdentSet:\n";
  24.     cout << i.asSortedCltn() << endl;
  25. }
  26.